import request from "./http"
import mock from  "@/mock"

class Apis {
    //获取首页数据
    // json1811.ashx?v=1562741893374&c=NewIndexController&m=index
    getIndexData() {
        return request({
            method: 'get',
            url: '/json1811.ashx',
            params: {
                "v": new Date().getTime(),
                "c": "NewIndexController",
                "m": "index"
            }
        });
    }
    //获取分类数据接口
    getNsCakeCenter(){
        return request({
            method: 'get',
            url: '/json1811.ashx',
            params: {
                "v": Date.parse(new Date()),
                "c": "NsCakeCenter",
                "m": "GetJdListNew"
            }
        });
    }
    getShowData(params){
        return request({
            method: 'get',
            url: '/json1811.ashx',
            params
        });
    }






    // testPhp() {
    //     // http://127.0.0.1/php/json.php
    //     return request({
    //         method: 'post',
    //         url: '/php/json.php',
    //         headers: {'Content-type': 'x-www-form-urlencoded'},
    //         data: {
    //             uname: 'Fred',
    //             upwd: '123456'
    //         },
    //     });

    //     // 是Get请求用params queryString params  不需要请求头
    //     // data 传默认  fromData
    //     // 设置请求头    application/x-www-form-urlencoded   Request payload  
    //     // $GET["xxxx"]
    // }
}
export default new Apis();